import Vue from 'vue';
//导入路由插件
import VueRouter from 'vue-router';

Vue.use(VueRouter);

// 将路由直接写在前端
export const constantRouterMap = [
    {path: '/', component: () => import('@/views/home/welcome'), hidden: true},
    {path: '/404', component: () => import('@/views/404'), hidden: true},
    {path: '/home/testRouter', component: () => import('@/views/home/testRouter'), hidden: true},
    {path: '*', redirect: '/404'}
];


export default new VueRouter({
    mode: 'history',
    routes: constantRouterMap
})
